import JSEncrypt from 'jsencrypt'

export function cmdRSAEncrypt(str) {
  const key =
      'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDIW6okAjFdKvZS/0bjLAGJy2tZcKJXHz+SmVDrcR4pNU6tadSXbQM3vxbAlPGuA4jfv5Teg8zrucV9gGOIa8D+gOkC3x8rY93biN+SefvMxWxoxwBpDvIlJcQXNBjPI/kreJASThw5bLTN8UxdyN2WP5EZYlEuSLKQkXihkFSwPwIDAQAB'
  const Encrypt = new JSEncrypt()
  Encrypt.setPublicKey(key)
  return Encrypt.encrypt(str)
}
